function addnew(old, optionid, value) {
	var obj = document.getElementById(optionid);
	var curr = document.getElementById(old).innerText;
	obj.value = "";
	if (curr != "") {
		for(var i = 0; i < obj.options.length; i++)
         {
             if(obj.options[i].value == curr)
             {
                 obj.options.remove(i);
                 break;
             }
         }
	}
	if(value != "") {
		obj.options.add(new Option(value, value));
	}
	document.getElementById(old).innerText = value;
}